package com.iflytek.ssm.service.impl;

import com.iflytek.ssm.dao.UserDao;
import com.iflytek.ssm.entity.User;
import com.iflytek.ssm.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    UserDao userDao;

    @Override
    public boolean checkLogin(String account, String pwd) throws SQLException {
        System.out.println("start checkLogin method");
        User user = userDao.getAccountAndPwd(account, pwd);
        if (user == null) {
            return false;
        } else {
            return true;
        }
    }
}
